package wuziqi;

import java.util.Scanner;

public class 五子棋 {
    public static void main(String[] args) {
        String[] arr = new String[100];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = "[ ] ";
        }
        while (true) {
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入你选择的行");
            int hang = sc.nextInt();
            System.out.println("请输入你选择的列");
            int lie = sc.nextInt();
            arr[(lie - 1) * 10 + (hang - 1)] = "[√] ";
            zhanshi(arr);
            System.out.println("请输入你选择的行");
            int hang1 = sc.nextInt();
            System.out.println("请输入你选择的列");
            int lie1 = sc.nextInt();
            arr[(lie1 - 1) * 10 + (hang1 - 1)] = "[x] ";
            zhanshi(arr);
        }

    }

    public static void zhanshi(String[] arr) {
        System.out.println("1   2   3   4   5   6   7   8   9   10");
        int Number = 1;
        for (int i = 0; i < arr.length; i++) {
            if (i % 10 == 0 && i != 0) {
                System.out.println(Number);
                System.out.print(arr[i]);
                Number++;
            } else {
                System.out.print(arr[i]);
            }
        }
        System.out.println(Number);
    }
}

